<extend name="Layout/layout"/>
<block name="style">
<style>
.fbutton{
    color: rgba(255, 255, 255, .9);
    background: #1E9FFF;
    display: inline-block;
    vertical-align: middle;
    font-size: 14px;
    transition: all .2s;
    -webkit-transition: all .2s;
    position: relative;
    line-height: 40px;
    min-width: 65px;
    padding: 0 15px;
    text-align: center;
    cursor: pointer;
}
.initBack{border: 0px;  background: #fff;}
</style>
</block>
<block name="body">
    <div class="main-title" style="float:left;">
        <h2><present name="data">[ {$data.title} ] 子</present>菜单管理 </h2>
    </div>

    <div class="cf" style="float:left; margin-left:20px;">
        <a class="fbutton btn" href="{:U('add',array('pid'=>I('get.pid',0)))}">新 增</a>
        <button class="fbutton btn ajax-post confirm" date-href="{:U('del')}" date-type="AllDel" target-form="ids">删 除</button>
        <!--a class="fbutton btn" href="{:U('import',array('pid'=>I('get.pid',0)))}">导 入</a>
        <button class="fbutton btn list_sort" url="{:U('sort',array('pid'=>I('get.pid',0)),'')}">排序</button-->
        <!-- 高级搜索 -->
        <!--div class="search-form fr cf">
            <div class="sleft">
                <input type="text" name="title" class="search-input" value="{:I('title')}" placeholder="请输入菜单名称">
                <a class="sch-btn" href="javascript:;" id="search" url="__SELF__"><i class="btn-search"></i></a>
            </div>
        </div-->
    </div>
    
    <div class="data-table table-striped">
        <form class="ids">
            <table class="layui-table" lay-even="">
                <colgroup>
                    <col width="60">
                    <col width="200">
                    <col>
                    <col>
                    <col>
                    <col>
                    <col width="230">
                </colgroup>
                <thead>
                <tr>
                    <th class="row-selected">
                        <input class="checkbox check-all" type="checkbox">
                    </th>
                    <th>ID</th>
                    <th>名称</th>
                    <th>上级菜单</th>
                    <th>分组</th>
                    <th>URL</th>
                    <th>排序</th>
                    <th>仅开发者模式显示</th>
                    <th>隐藏</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                    <notempty name="list">
                        <volist name="list" id="menu">
                            <tr>
                                <td><input class="ids row-selected" type="checkbox" name="id[]" value="{$menu.id}"></td>
                                <td>{$menu.id}</td>
                                <td>
                                    <a href="{:U('index?pid='.$menu['id'])}">{$menu.title}</a>
                                </td>
                                <td>{$menu.up_title|default='无'}</td>
                                <td>{$menu.group}</td>
                                <td>{$menu.url}</td>
                                <td>{$menu.sort}</td>
                                <td>
                                    <a href="{:U('toogleDev',array('id'=>$menu['id'],'value'=>abs($menu['is_dev']-1)))}" class="ajax-get">
                                    {$menu.is_dev_text}
                                    </a>
                                </td>
                                <td>
                                    <a href="{:U('toogleHide',array('id'=>$menu['id'],'value'=>abs($menu['hide']-1)))}" class="ajax-get">
                                    {$menu.hide_text}
                                    </a>
                                </td>
                                <td>
                                    <a title="编辑" href="{:U('edit?id='.$menu['id'])}">编辑</a>
                                    <a onclick="javascript:void(0);" class="confirm ajax-get" title="删除" date-href="{:U('del?id='.$menu['id'])}">删除</a>
                                </td>
                            </tr>
                        </volist>
                    <else/>
                        <td colspan="10" class="text-center"> aOh! 暂时还没有内容! </td>
                    </notempty>
                </tbody>
            </table>
        </form>
        <!-- 分页 -->
        <div class="page">
            {$_page}
        </div>
    </div>
</block>

<block name="script">
    <script type="text/javascript">
    //
    

    //导航高亮
    //highlight_subnav('{:U('index')}');

    </script>
</block>